package com.avantis.admin.controller;

import com.avantis.admin.service.ProductService;
import com.avantis.common.base.BaseController;
import com.avantis.common.msg.YResult;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author: tracywang
 * @Date: 2019/2/1
 * @Descrption:
 */
@RestController
@RequestMapping("/product")
public class ProductController extends BaseController {

    private static final Logger LOGGER = LoggerFactory.getLogger(ProductController.class);

    @Autowired
    private ProductService productService;

//    @GetMapping("/early/product/list")
//    @ApiImplicitParams({
//            @ApiImplicitParam(name = "page", value = "分页数", required = true, dataType = "Integer", paramType = "query"),
//            @ApiImplicitParam(name = "size", value = "每页大小", required = true, dataType = "Intefer", paramType = "query")
//    })
//    @ApiOperation(value = "期初商品列表接口", httpMethod = "POST", notes = "")
//    public YResult list(@RequestParam(value = "page") Integer page, @RequestParam(value = "size") Integer size) {
//        YResult yResult = restProcessor(() -> {
//            try {
//                Map<String, Object> hashMap = new HashMap<>();
//                hashMap.put("customers", customerService.getPage(page, size));
//                return YResult.ok(hashMap);
//            } catch (Exception e) {
//                return YResult.error(e.getMessage());
//            }
//        });
//        return yResult;
//    }
}
